import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { SellerCashierVO, SellerCashierForm, SellerCashierQuery } from '@/api/retail/sellerCashier/types';

/**
 * 查询售货员收银账号列表
 * @param query
 * @returns {*}
 */

export const listSellerCashier = (query?: SellerCashierQuery): AxiosPromise<SellerCashierVO[]> => {
  return request({
    url: '/retail/sellerCashier/list',
    method: 'get',
    params: query
  });
};

/**
 * 查询售货员收银账号详细
 * @param id
 */
export const getSellerCashier = (id: string | number): AxiosPromise<SellerCashierVO> => {
  return request({
    url: '/retail/sellerCashier/' + id,
    method: 'get'
  });
};

/**
 * 删除售货员收银账号
 * @param id
 */
export const delSellerCashier = (id: string | number | Array<string | number>) => {
  return request({
    url: '/retail/sellerCashier/' + id,
    method: 'delete'
  });
};
